package com.crm.system.controller.permissionManagement;

import com.crm.common.model.DataResponse;
import com.crm.common.model.DhPageInfo;
import com.crm.common.model.DhResponse;
import com.crm.common.model.Enum.ResponseCodeEnum;
import com.crm.model.entity.sys.permissionManagement.SysCompany;
import com.crm.system.service.permissionManagement.SysCompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * @author luojie
 * @date 2020/12/28 15:06
 */
@RestController
@RequestMapping("/company")
public class CompanyController {

    @Autowired
    private SysCompanyService companyService;

    /**
     * 查询所有公司列表
     * @return
     */
    @GetMapping("/getCompanyList")
    public DataResponse getCompanyList(){
        List<SysCompany> sysCompanies = companyService.selectSysCompanyList();
        return new DhResponse(ResponseCodeEnum.OK.getResponseCode(),sysCompanies);
    }

}
